// Author: combacsa@kaist.ac.kr
// http://www.jungol.co.kr/prog/Hanal/hanalView.php?qs_code=1048

//#define COMPILE
#ifdef COMPILE

#include <fstream>

using namespace std;

int n;

void input() {
    ifstream in("input.txt");
    
    in >> n;
    
    in.close();
}

void output() {
    ofstream out("output.txt");
    
    int count_2 = 0;
    int count_5 = 0;
    
    for (int i = 1; i <= n; i++) {
        int m = i;
    
        while ((m % 2) == 0) {
            count_2++;
            m /= 2;
        }
    
        while ((m % 5) == 0) {
            count_5++;
            m /= 5;
        }
        
    }
    int answer = count_2;
    if (answer > count_5)
        answer = count_5;
    
    if (n == 0)
        out << 1;
    else
        out << answer;
    
    out.close();
}

int main() {
    input();
    
    
    output();
    return 0;
}


#endif

